package com.xmut.xmutbackend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel(value = "Notification对象", description = "通知表")
public class Notification implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("通知ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("通知标题")
    private String title;

    @ApiModelProperty("通知内容")
    private String content;

    @ApiModelProperty("通知类型：1-系统通知 2-班级通知 3-部门通知 4-个人通知")
    @TableField("notification_type")
    private Integer notificationType;

    @ApiModelProperty("发送者（关联 users 表 id）")
    private Long senderId;

    @ApiModelProperty("接收者类型：1-学生 2-班级 3-部门 4-员工 5-用户")
    @TableField("receiver_type")
    private Integer receiverType;

    @ApiModelProperty("接收者ID（关联对应表的 id）")
    private Long receiverId;

    @ApiModelProperty("状态：1-未读 2-已读 3-已删除")
    private Integer status;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
}